package com.atgm.mall.gmmailorder.exception;

import com.atgm.common.exception.OrderException;
import com.atgm.common.utils.R;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class OrderExceptionHandler {

    @ExceptionHandler(OrderException.class)
    public R handlerOrderException(OrderException e) {
        return R.error(e.getCode(), e.getMsg());
    }
}
